As the number of enterprises that run their applications in data centers has increased, interest in developing and running these applications in containers has also increased. A container is an application packaged in a complete file system that includes the application code, runtime and system tools, system libraries, and configuration files. Containers effectively isolate applications running on the same host from each other and share the same operating system kernel of the host. Containers ensure that an application will run the same regardless of the computing environment the application is running in, because containers do not depend on any specific infrastructure. As a result, containers can be used to reliably run applications and move applications to different computing environments. For example, an application may be developed in a container on a developer's laptop and moved to a staging environment and into production on a server computer in a data center or to a virtual machine (“VM”) in a private or public cloud without complications.
Running applications in containers and in VMs on physical computer systems are becoming common practice and each has its own merits. Consider an application run in a VM and run in a container. The VM runs a full copy of an operating system and a virtual copy of the hardware the operating system needs on top of the operating system of a server computer. On the other hand, the container runs the application using only a fraction of the operating system, support programs and libraries, and other resource of the server computer. As a result, the VM typically uses more RAM and CPU of the server computer than the container, the application may be started more quickly in the container than the VM, and many more applications may be run in containers on the server computer than may be run in VMs on the same server computer. Although containers appear to be a favorable alternative to VMs, containers do not provide the security benefits of VMs.
Because containers provide flexibility for application development and deployment, containers are often hard to monitor and meter. The volatile association of a container with a host server computer due to the container's short lived nature poses unique challenges for IT managers trying to track the cost of applications packaged in containers. Suppose an application is developed for a period of time in a container on a first host and the container is moved to a second host and developed for an additional period of time. IT managers need to accurately measure utilization of the container on both hosts and attribute the costs of running the application on the respective hosts. Many developers also view running containers on VMs as the direction of the future. As a result, IT managers seek methods to determine the cost of containers run on VMs and containers that run directly on a server computer before distributing the costs to the containers.